<%--
  Created by IntelliJ IDEA.
  User: MACHENIKE
  Date: 2021/9/16
  Time: 17:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>emplist</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div id="wrap">
    <div id="top_content">
        <div id="header">
            <div id="rightheader">
                <p>
                    2021/09/17
                    <br />
                    Author=lala
                    <br />
                </p>
            </div>
            <div id="topheader">
                <h1 id="title">
                    <a href="#">main</a>
                </h1>
            </div>
            <div id="navigation">
            </div>
        </div>
        <div id="content">
            <p id="whereami">
            </p>
            <h1>
                Welcome Master!
            </h1>
            <table class="table">
                <tr class="table_header">
                    <td>ID</td>
                    <td>Name</td>
                    <td>Salary</td>
                    <td>Age</td>
                    <td>Operation</td>
                </tr>
                <c:forEach items="${pageInfo.list}" var="emps">
                    <tr class="row1">
                        <td>${emps.id}</td>
                        <td>${emps.name}</td>
                        <td>${emps.salary}</td>
                        <td>${emps.age}</td>
                        <td><a href="delete?empId=${emps.id}">delete emp</a>&nbsp;<a href="SelectOne?empId=${emps.id}">update emp</a></td>
                    </tr>
                </c:forEach>
                <tr>
                    <td colspan="5" align="center">
                        <a href="page">首页</a>
                        <a href="page?pageNum=${pageInfo.pageNum-1}">
                            <c:if test="${pageInfo.hasPreviousPage}">上一页</c:if></a>
                        <a href="page?pageNum=${pageInfo.pageNum+1}"
                            <c:if test="${pageInfo.hasNextPage}">>下一页</c:if></a>
                        <a href="page?pageNum=${pageInfo.pages}">尾页</a>
                        <a href="login.jsp">注销</a>
                    </td>
                </tr>
            </table>
            <p>
                <input type="button" class="button" value="Add Employee" onclick="location='addEmp.jsp'"/>
            </p>
        </div>
    </div>
    <div id="footer">
        <div id="footer_bg">
            ABC@126.com
        </div>
    </div>
</div>
</body>
</html>
